﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace SGT.Model
{
    public class Sector : INotifyPropertyChanged
    {
        private int _SectorID;
        private double _Capacidad;
        private string _Nombre;
        //private int _DepositoID;
        //private int _MercaderiaID;
        //private Deposito _Deposito;
        private Mercaderia _Mercaderia;
        private double _UsoActual;
     


        public Sector()
        {
        }

        public int SectorID
        {
            get { return _SectorID; }
            set
            {
                _SectorID = value;
                RaisePropertyChanged("SectorID");
            }
        }

     /*   public int DepositoID
        {
            get { return _DepositoID; }
            set
            {
                _DepositoID = value;
                RaisePropertyChanged("DepositoID");
            }
        }

        public int MercaderiaID
        {
            get { return _MercaderiaID; }
            set
            {
                _MercaderiaID = value;
                RaisePropertyChanged("MercaderiaID");
            }
        }*/

        public double Capacidad
        {
            get { return _Capacidad; }
            set
            {
                _Capacidad = value;
                RaisePropertyChanged("Capacidad");
            }
        }


        public double MaxRango
        {
            get { return _Capacidad + (_Capacidad/100); }
            
        }

        public double UsoActual
        {
            get { return _UsoActual; }
            set
            {
                _UsoActual = value;
                RaisePropertyChanged("UsoActual");
            }
        }
      /*  public Deposito GetDeposito
        {
            get { return _Deposito; }
            set
            {
                _Deposito = value;
                RaisePropertyChanged("GetDeposito");
            }
        }*/
        public Mercaderia TipoMercaderia
        {
            get { return _Mercaderia; }
            set
            {
                _Mercaderia = value;
                RaisePropertyChanged("TipoMercaderia");
            }
        }
        public string Nombre
        {
            get { return _Nombre; }
            set
            {
                _Nombre = value;
                RaisePropertyChanged("Nombre");
            }
        }

  




        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        private void RaisePropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(
                    this,
                    new PropertyChangedEventArgs(propertyName)
                    );
            }
        }

        #endregion
    }
}
